//
// Created by Arikes on 9/20/21.
//

#ifndef DESIGNERMODE_PROXY_H
#define DESIGNERMODE_PROXY_H

#include "RealSubject.h"
namespace ProxyMode
{
    class Proxy:public Subject
    {
    public:
        Proxy()
        {
            _realSubject = new RealSubject();
        }

        virtual void display()
        {
            addRequestInfo();
            _realSubject->display();
        }

    protected:
        void addRequestInfo()
        {
            std::cout<<"Proxy addRequestInfo"<<std::endl;
        }

    private:
        RealSubject* _realSubject = nullptr;
    };
}

#endif //DESIGNERMODE_PROXY_H

//ProxyMode::Proxy proxy;
//proxy.display();
